package com.pd.modules.common.logging;

import java.util.ArrayList;
import java.util.Observable;

public class LogModel extends Observable
{
	private ArrayList<String> mLogs = new ArrayList<String>();

	public synchronized void addLog(String record)
	{
		mLogs.add(record);
		setChanged();
		notifyObservers();
	}

	public synchronized String getLast()
	{
		String ret = mLogs.get(mLogs.size() - 1);
		mLogs.remove(ret);
		return ret;
	}
}
